<%@ page import="com.raycloud.util.CmdUtil" %>
<%@ page import="com.raycloud.constants.SystemConstant" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%

    String projectName = request.getParameter("projectName");
    if (projectName==null||projectName.equals(""))return;
    response.setContentType("text/html;charset=utf-8");
    response.getWriter().println("发布中 请等待...<br/>");
    response.getWriter().flush();
    CmdUtil.execv("sh "+ SystemConstant.ROOT_PATH+"/"+projectName+"/publish.sh",response.getWriter());
    response.getWriter().flush();
    response.getWriter().println("添加监控脚本 ... <br/>");
    response.getWriter().flush();
    String monitor = CmdUtil.exec("cp /data/project/index_monitor.sh "+SystemConstant.ROOT_PATH+"/"+projectName+"/code/");
    response.getWriter().println("发布结束!<br/>");
    response.getWriter().flush();
    response.getWriter().close();
%>